<?php
/**
 * template : menu top
 * theme : default
 * author : Gmax
 */
//$data = $this->getDatas();
$data = $this->getTranslatedDatas(session::get('lang'));
?>
<ul id="menu_top" itemscope itemtype="http://schema.org/ListItem">
    <?php foreach($data['items'] as $order=>$item): ?>
    <li itemprop="item" itemscope itemtype="http://schema.org/SiteNavigationElement" class="<?php echo (navigation::isNavigationActive($item['url']))?'active ':''; ?><?php echo $item['class']; ?>">
        <a class="_tooltips_show" href="<?php echo $item['url']; ?>" title="<?php echo $item['title']; ?>" target="<?php echo $item['target']; ?>">
            <span itemprop="name"><?php echo $item['label']; ?></span>
            <meta itemprop="url" content="<?php echo $item['url']; ?>" />
            <meta itemprop="position" content="<?php echo $order; ?>" />
        </a>
        <?php if(count($item['items'])>0): ?>
        <ul itemscope additionalType="http://schema.org/ListItem">
        <?php foreach($item['items'] as $sOrder=>$sItem): ?>
            <li itemprop="item" itemscope itemtype="http://schema.org/SiteNavigationElement" class="<?php echo (navigation::isNavigationActive($sItem['url']))?'active ':''; ?><?php echo $sItem['class']; ?>">
                <a href="<?php echo $sItem['url']; ?>" title="<?php echo $sItem['title']; ?>" target="<?php echo $sItem['target']; ?>">
                    <span itemprop="name">> <?php echo $sItem['label']; ?></span>
                    <meta itemprop="url" content="<?php echo $sItem['url']; ?>" />
                    <meta itemprop="position" content="<?php echo $sOrder; ?>" />
                </a>
            </li>
        <?php endforeach; ?>
        </ul>
        <?php endif; ?>
    </li>
    <?php endforeach; ?>
</ul>